package com.heima.wemedia.thread;

import com.heima.model.wemedia.pojos.WmUser;

public class WmUserThreadLocal {
    //1.声明一个ThreadLocal类型的变量
    private static ThreadLocal<WmUser> userThreadLocal = new ThreadLocal<>();

    //2.创建这个变量的get,set方法

    public static WmUser get() {
        return userThreadLocal.get();
    }

    public static void set(WmUser wmUser) {
        userThreadLocal.set(wmUser);
    }

    //3.创建这个变量的remove方法
    public static void remove(){
        userThreadLocal.remove();
    }
}
